initialize format.visited.
authorSven Neumann <sven@gimp.org>
Wed, 14 May 2008 15:18:26 +0000 (15:18 +0000)
committerSven Neumann <neo@src.gnome.org>
Wed, 14 May 2008 15:18:26 +0000 (15:18 +0000)
2008-05-14  Sven Neumann  <sven@gimp.org>

* babl/babl-format.c (format_new): initialize format.visited.

* babl/babl-format.h
* babl/babl-fish-path.c: formatting.

svn path=/trunk/; revision=311

ChangeLog
babl/babl-fish-path.c
babl/babl-format.c
babl/babl-format.h

index f7d6b7d4816d1da1d53a94e793fba92ff898dbb3..c01b46f34b6b0d7b9b8bd89a642945114a7d0dc0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-05-14  Sven Neumann  <sven@gimp.org>
+
+       * babl/babl-format.c (format_new): initialize format.visited.
+
+       * babl/babl-format.h
+       * babl/babl-fish-path.c: formatting.
+
 2008-04-16  Sven Neumann  <sven@gimp.org>
 
        * babl/babl.h: formatting.
index e4674f0923e821265c2cd3c8dbc99ac04ce9ea3e..ee9fe026f2c7d728bbec0b03031a58f5d9680d9d 100644 (file)
@@ -152,7 +152,8 @@ get_conversion_path (Babl *current_format,
                * let's copy it into our new fish */
               fish_path->fish_path.cost = path_cost;
               fish_path->fish.error  = path_error;
-              babl_list_copy (current_path, fish_path->fish_path.conversion_list);
+              babl_list_copy (current_path,
+                              fish_path->fish_path.conversion_list);
             }
         }
     }
@@ -169,7 +170,7 @@ get_conversion_path (Babl *current_format,
           /* Mark the current format in conversion path as visited */
           current_format->format.visited = 1;
 
-           /* Iterate through unvisited formats from the current format ...*/
+          /* Iterate through unvisited formats from the current format ...*/
           for (i = 0; i < babl_list_size (list); i++)
             {
               Babl *next_conversion = BABL (list->items[i]);
@@ -372,7 +373,7 @@ test_create (void)
 
 // FishPath instrumentation
 
-static Babl *fmt_rgba_double = NULL;
+static Babl   *fmt_rgba_double = NULL;
 static double *test = NULL;
 static void   *source;
 static void   *destination;
@@ -382,8 +383,8 @@ static double *ref_destination_rgba_double;
 static Babl   *fish_rgba_to_source;
 static Babl   *fish_reference;
 static Babl   *fish_destination_to_rgba;
-static double reference_cost;
-static int    init_instrumentation_done = 0;
+static double  reference_cost;
+static int     init_instrumentation_done = 0;
 
 static void
 init_path_instrumentation (Babl *fmt_source,
index 827a0796f27ef7eac0fc55c3bf9379aa2848485e..bc080c615f5294f9e29dc7203945a665571916be 100644 (file)
@@ -103,6 +103,7 @@ format_new (const char     *name,
   }
 
   babl->format.loss = -1.0;
+  babl->format.visited = 0;
   babl->format.image_template = NULL;
 
   return babl;
index e7b71110ecebdfe61e2a116ff874382351cd3c2a..4903e24d966f55d55843788f8074756cdadb1f7b 100644 (file)
@@ -17,7 +17,7 @@
  */
 
 #ifndef _BABL_H
-#error  this file is only to be included by babl.h 
+#error  this file is only to be included by babl.h
 #endif
 
 /****************************************************************/
@@ -42,10 +42,10 @@ BABL_NAMED_CLASS (format);
  */
 Babl *babl_format_id     (int id);
 void  babl_format_each   (BablEachFunction  each_fun,
-                        void             *user_data);
+                          void             *user_data);
 Babl * babl_format       (const char       *name);
 Babl * babl_format_new   (void             *first_arg,
-                        ...) BABL_ARG_NULL_TERMINATED;
+                          ...) BABL_ARG_NULL_TERMINATED;
 
 typedef struct
 {
@@ -54,8 +54,8 @@ typedef struct
   int              components;
   BablComponent  **component;
   BablType       **type;
-  void            *image_template; /* image template for use with 
-                                       linear (non-planer) images */
+  void            *image_template; /* image template for use with
+                                      linear (non-planer) images */
 
   BablSampling   **sampling;
   BablModel       *model;
@@ -63,6 +63,6 @@ typedef struct
   int              planar;
   double           loss; /*< average relative error when converting
                              from and to RGBA double */
-  int              visited; /* for convenience in code while searching 
+  int              visited; /* for convenience in code while searching
                                for conversion paths */
 } BablFormat;